export default {
  namespaced: true,
  state: {
    roomInfo: {}, //房间信息 用户名，房间号，由用户开启一个房间，生产房间号，还有live链接
    userSign: {
      SDKAppId: "1400493274",
      userSig:
        "eJwtzV0LgjAUBuD-suuyuTYloZsQilKLLFDoxtgah2h*zY*M-numXp7nfXnPB1280KhFgRxEDIxmww1cKA0PGLgqRTFvEiVzUFILJadSyZ9JlgFHjkkxpqslsemYiDaDQvTOGCMY41E1vP5mmYz2TMxpBWT-A2K3tlttN-vdbcHj47vzq0BttkF6cO-hqVGRd5VW3p7Tzl*j7w*hQjee"
    }, //进入房间后，生产的tencent user sig 生成的配置应由服务器提供的接口 genTestUserSig为本地测试方法生成,
    camera: {},
    micPhone: {}
  },
  getters: {},
  mutations: {
    updateRoomInfo(state, payload) {
      state.roomInfo = payload;
    },
    updateUserSign(state, payload) {
      state.userSign = payload;
    },
    updateCamera(state, payload) {
      state.camera = payload;
    },
    updateMicPhone(state, payload) {
      state.micPhone = payload;
    }
  },
  actions: {
    updateRoomInfo({ commit }, payload) {
      console.log(payload);
      commit("updateRoomInfo", payload);
    },
    updateUserSign({ commit }, payload) {
      commit("updateUserSign", payload);
    },
    updateCamera({ commit }, payload) {
      commit("updateCamera", payload);
    },
    updateMicPhone({ commit }, payload) {
      commit("updateMicPhone", payload);
    }
  }
};
